import request from '@/utils/request'

export function create(data) {
  return request({
    url: '/role',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: '/role',
    method: 'put',
    data
  })
}

export function page(data) {
  return request({
    url: '/role/list/' + data.page + '/' + data.size,
    method: 'get',
    data: null
  })
}

export function remove(id) {
  return request({
    url: '/role/' + id,
    method: 'delete'
  })
}

export function permissions() {
  return request({
    url: '/permission',
    method: 'get'
  })
}

